package summative;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

public class GetInformation 
{
	private Scanner in = null;
	private File file = null;
	private int counter = 0;
	
	public GetInformation (File file)
	{
		this.file = file;
		try{
			in = new Scanner (file);
		}catch(FileNotFoundException ex)
		{
		}
	}
	public int calculateNumber()
	{
		while(in.hasNextLine())
		{
			counter++;
		}
		return counter;
	}
	public String getText()
	{
		if(in.hasNextLine())
		{
			return in.nextLine();
		}
		return null;
	}

}
